{% extends "main_template.html" %}

{% block content %}
<table>
<tr>
{% for hraid in hraids %}
   <th colspan="3">
     <div><h1>{{hraid.raid.instance.name}}</h1></div>
     <div>{{hraid.raid.start_time|date:"D d M" }}</div>
     <h2>Item claims:</h2>
     <ol>
     {%for s in hraid.suicides%}
      <li>{{s.character.name}}</li>
     {% endfor %}
     </ol>
	<h2>Greed rolls:</h2>
	<ul>
		{%for g in hraid.greeds%}
		<li>{{g.character.name}}</li>
		{%endfor%}
	</ul>
  </th>
{% endfor %}
<tr>
{% for r in rt %}
   <tr>
   {% for c in r %}
     <td class="rank">
       {{c.rank}}
     </td>
     <td style="background-color:#{{c.char.character_class.hex_colour}}" class="{%if c.inraid%}inraid{%else%}notinraid{%endif%}">
      <img style="opacity:{%if c.inraid%}1.0{%else%}0.4{%endif%};" src="/media/img/{{ c.char.character_class.icon}}" width="16" height="16"/>
     </td>
     <td style="background-color:#{{c.char.character_class.hex_colour}}" class="{%if c.inraid%}inraid{%else%}notinraid{%endif%} split">
         <span>{{c.char.name}}
           {% for s in c.suicides %}         
             <img src="/media/img/ring1.png" alt="{{s.item.name}}" title="{{s.item.name}}"/>
           {% endfor %}
         </span>
     </td>
   {% endfor %}
   </tr>
{% endfor %}
</table>
{% endblock %}
